import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'package:t3_data_service/biz_data_source/map/poi/lat_lng.dart';
import 'package:t3_data_service/data_provider/map_sctx/t3_map_sctx_provider.dart';

import 'map/core/t3_location.dart';
import 't3_map_method_channel.dart';

abstract class T3MapPlatform extends PlatformInterface {
  /// Constructs a T3MapPlatform.
  T3MapPlatform() : super(token: _token);

  static final Object _token = Object();

  static T3MapPlatform _instance = MethodChannelT3Map();

  /// The default instance of [T3MapPlatform] to use.
  ///
  /// Defaults to [MethodChannelT3Map].
  static T3MapPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [T3MapPlatform] when
  /// they register themselves.
  static set instance(T3MapPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String?> getWalkRoute({
    required T3MapType mapType, 
    required T3LocationCoordinate2D origin, 
    required T3LocationCoordinate2D destination}) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String?> getDriveRoute({
    required T3MapType mapType, 
    required T3LocationCoordinate2D origin, 
    required T3LocationCoordinate2D destination,
    List<T3LocationCoordinate2D>? viaPoints,
    String? originPoiId,
    String? destPoiId,
    double? departureTime}) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String?> getRegeo({
    required T3MapType mapType, 
    required T3LocationCoordinate2D coordinate}) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String?> searchPoiTypeCode(
      String? keyword, String poiType, LatLng latLng, int radius);
}
